//---------------------------------------------------------------------------

#ifndef ShipmentsReportH
#define ShipmentsReportH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <QuickRpt.hpp>
#include <Qrctrls.hpp>
#include "ShipmentBridge.h"
#include <QRCtrls.hpp>

class TShipmentReport
{
   public:
      TShipmentReport( TDatabase * database);
      ~TShipmentReport();

      TQuery * GetQuery();

      void Produce( int year, int month, __int64 providerID);
      void Close();

      int  year;

   private:
      TQuery * qryShipments;

      void BuildQuery();
};

//---------------------------------------------------------------------------
class TfrmShipmentsReport : public TForm
{
__published:	// IDE-managed Components
        TQuickRep *qrShipments;
        TQRBand *bndTitle;
        TQRLabel *lblTitle;
        TQRBand *bndHeader;
        TQRLabel *lblShipemntDate;
        TQRLabel *lblShipmentNumber;
        TQRLabel *lblAmount;
        TQRBand *bndDetails;
        TQRBand *bndSummary;
        TQRLabel *lblTotalAmount;
        TQRLabel *lblTotalAmountValue;
        TQRDBText *txtShipmentNoValue;
        TQRDBText *txtDateValue;
        TQRDBText *txtAmountValue;
        void __fastcall FormDestroy(TObject *Sender);
        void __fastcall bndSummaryBeforePrint(TQRCustomBand *Sender,
          bool &PrintBand);
        void __fastcall lblAmountValuePrint(TObject *sender,
          AnsiString &Value);
private:
        TShipmentReport * shipmentReport;
        double totalAmount;        
public:
        __fastcall TfrmShipmentsReport(TComponent* Owner, TDatabase* dbMain);
        void Preview( int year, int month, __int64 providerID);
};
//---------------------------------------------------------------------------
#endif
